<?php
$this->breadcrumbs = array(
    'Contact Uses' => array('index'),
    'Manage',
);
?>
<div class="box">
    <header>
        <h5>Manage Contact</h5>
    </header>
    <div class="body">

	<?php
	$this->widget('bootstrap.widgets.TbGridView', array(
	    'id' => 'contact-us-grid',
	    'dataProvider' => $model->search(),
	    'filter' => $model,
	    'columns' => array(
		'name',
		array(
		    'name' => 'email',
		    'header' => 'Email',
		    'type' => 'raw',
		    'value' => 'CHtml::link($data->email, array("/contactus/send", "email" => $data->email))'
		),
		'phone',
		'subject',
		array(
		    'name' => 'create_time',
		    'type' => 'datetime'
		),
		array(
		    'name' => 'readed',
		    'type' => 'raw',
		    'value' => '$data->readed==0?"New":"-"',
		    'filter' => array(
			0 => 'Unread',
			1 => 'New'
		    ),
		    'header' => 'Status'
		),
		array(
		    'class' => 'bootstrap.widgets.TbButtonColumn',
		    'template' => '{view}{delete}'
		),
	    ),
	));
	?>
    </div>
</div>